package com.wxg.utils;

import org.openqa.selenium.WebDriver;

import com.machinepublishers.jbrowserdriver.JBrowserDriver;
import com.machinepublishers.jbrowserdriver.Settings;
import com.machinepublishers.jbrowserdriver.Timezone;

/**
 * Add 2018年2月8日
 * @author Wxg
 *
 */
public class MyJBrowserDriver {
	private static WebDriver driver;
	public WebDriver getDriver(){
		if(null == driver){
			driver = new JBrowserDriver(Settings.builder().timezone(Timezone.AMERICA_NEWYORK).build());
		}
		return driver;
	}
	public void closeDriver(){
		if(null != driver){
			driver.quit();
			driver = null;
		}
	}
}
